//引入项目中所有组件
import SvgIcon from "./SvgIcon/index.vue";
import Pagination from "./Pagination/index.vue";

//全局对象
const allGlobalComponents = {
  SvgIcon,
  Pagination,
};

//对外暴露插件对象
export default {
  // Exporting the components
  //需要叫做install方法
  install(app: any) {
    //注册项目的全部组件
    Object.keys(allGlobalComponents).forEach((key) => {
      //全局注册组件
      app.component(key, allGlobalComponents[key]);
    });
  },
};
